# coding: UTF-8
#!/usr/bin/env python
#filename: D:/workspace/python/demo/mybatishandler/ResultMap.py

'''
Created on 2013-7-12 下午2:09:17

@author: zhanghu
'''

class ResultMap(object):
    '''
    classdocs
    '''
    id = None
    type = None
    primaryKey = {}
    results = []

    def __init__(self):
        '''
        Constructor
        '''
        
    def showStr(self):
        print 'resultMap =========================<'
        print 'id:%s, type:%s' % (self.id, self.type)
        print 'primaryKey : %s' % self.primaryKey
        for r in self.results:
            print 'result %s' % r
        print 'resultMap =========================>'
        
    def getAllField(self):
         result = [self.primaryKey]
         result.extend(self.results)
         
         return result[:]
        
if __name__ == '__main__':
    rm = ResultMap()
    rm.primaryKey = {'column' : 'Id'}
    rm.results = [{'column' : 'orderId'}, {'column':'partnerId'}]
    print rm.getAllField()
